package com.bdzl.auth.dao;

import com.bdzl.pub.entity.sys.UserDO;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 系统用户/客户账号表
 * @author yangyicai
 * @email yangyicai@foxmail.com
 * @date 2021-03-23 13:59:22
 */
public interface UserDao {

	UserDO get(Integer userId);

	List<UserDO> list(Map<String, Object> map);

	int count(Map<String, Object> map);

	int save(UserDO user);

	int update(UserDO user);

	int remove(Integer user_id);

	int batchRemove(Integer[] userIds);
	/**
	 * @Description: TODO 根据登录账户查询用户
	 * @param userLgname 登录账户
	 * @return: com.bdzl.pub.entity.sys.UserDO
	 * @Author: Ming
	 * @Date: 2021/4/28 9:31
	 */
	@Select("select * from sys_user where user_lgname = #{value}")
	UserDO getByUserLgname(String userLgname);

	/**
	 * @Author Zhn
	 * @Description //TODO 根据小程序openid获取用户
	 * @Date 14:02 2021/5/11
	 * @Param [userOpenid]
	 * @return com.bdzl.pub.entity.sys.UserDO
	 **/
	List<UserDO> getByUserOpenid(String userOpenid);
	/**
	* @Description: TODO 查询家访员
	* @param
	* @return: java.util.List<com.bdzl.pub.entity.sys.UserDO>
	* @Author: Ming
	* @Date: 2021/5/25 18:18
	*/
	List<UserDO> getHomeVisit();
}
